// pages/demo04/demo04.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    num: 0,
    test: ''
  },
  handleInput(e) {
    console.log(e,e.detail.value)
    // 小程序中赋值
    this.setData({
      test: e.detail.value
    })
  },
  handletapAdd(e) {
    console.log(e)
    // 获取自定义属性operation
    const operation = e.target.dataset.operation111
    console.log(operation)
    this.setData({
      num: this.data.num += operation
    })
  },
  handletapReduce(e){
    console.log(e)
    const operation = e.target.dataset.operation
    console.log(operation)
    this.setData({
      num: this.data.num += operation
    })
  }
})